//
//  e7timemanager.cpp
//  e7engine
//
//  Created by cc on 12-6-12.
//  Copyright (c) 2012年 cc. All rights reserved.
//

#include "e7timemanager.h"

namespace e7engine {
    CE7TimeManager::CE7TimeManager()
    {
    }
    
    CE7TimeManager::~CE7TimeManager()
    {
    }
    
    const unsigned int CE7TimeManager::GetTimeUINT()
    {
        ::gettimeofday(&m_insTimeVal, 0) ;
        return (m_insTimeVal.tv_sec) ;
    }

    const char* CE7TimeManager::GetTimeSTR()
    {
        time_t tmp ;
        ::time(&tmp) ;
        tm* ptm = ::localtime(&tmp) ;
        m_insTM = *ptm ;
        
        ::memset(m_strTime, 0, _STRLEN_TIME) ;
        ::sprintf(m_strTime, _TIME_STR_FORMAT,
                  GetYear(), GetMon(), GetMDay(),
                  GetHour(), GetMin(), GetSec()) ;
        return m_strTime ;
    }
}














